<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    <c:if test="${registCosts.size()==0}">
     toastr.warning("暂无需要结账数据");
    </c:if>
</script>
<div class="row" id="acctInfo">
    <div class="col-lg-6" >
        <section class="panel">
            <div class="panel-body">
                <form class="form-horizontal" id="registInfo">
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="costsMon">挂号数：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" name="registCount" value="${clinicMaster.registCount}" id="registCount" style="width: 80px;" readonly="true">
                        </div>
                        <label class="col-sm-2 control-label" for="backCount">退号数：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" name="backCount" value="${clinicMaster.backCount}" id="backCount" style="width: 80px;" readonly="true">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="totalCost">计价总额：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="totalCost" name="totalCost" value="${clinicMaster.totalCost}"  style="width: 80px;" readonly="true">
                        </div>
                        <label class="col-sm-2 control-label" for="backTotalCost">退号总额：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="backTotalCost" value="${clinicMaster.baclTotalCost}" name="baclTotalCost" style="width: 80px;" readonly="true">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label" for="costsMon">实收总额：</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="costsMon" name="totalReceipts" value="${clinicMaster.totalReceipts}" style="width: 80px;" readonly="true">
                        </div>
                    </div>
                </form>
            </div>
        </section>
    </div>
    <div class="col-lg-6" >
        <section class="panel" style="height: 100%">
            <div class="panel-body">
                <table class="table table-bordered mg-t datatable">
                    <thead>
                    <tr>
                        <th>会计科目</th>
                        <th>实收费用</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${registCosts}" var="registCost">
                        <tr>
                            <td>${fns:getDictLabels(registCost.subjCode,'TALLY_SUBJECT_DICT','')}</td>
                            <td>${registCost.cost}</td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </section>
    </div>
</div>
<div class="row" id="typeInfo">
    <section class="panel" style="height: 100%">
        <div class="panel-body">
            <table class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <th>支付方式</th>
                    <th>收款金额</th>
                    <th>退号金额</th>
                    <th>实收小计</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${costs}" var="costs">
                    <tr>
                        <td>${fns:getDictLabel(costs.type, 'PAY_WAY_DICT', defaultValue)}</td>
                        <td>${costs.clinicChage}</td>
                        <td>${costs.backChage}</td>
                        <td>${costs.receiptsChage}</td>
                    </tr>
                </c:forEach>

                </tbody>
            </table>
        </div>
    </section>
</div>
